package mspbots.next.ticket.common;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * mspbots.next.ticket.common.RequestApiParams
 *
 * @author <a href="https://github.com/vnobo">Alex bob</a>
 * @date Created by 2020/12/2
 */
public class RequestApiParams {

    @Min(0)
    private Long tenantId;

    @NotNull
    private QueryParams queryParams;

    @NotBlank
    private String request;


    public static RequestApiParams withDefault(Long tenantId) {
        RequestApiParams requestApiParams = new RequestApiParams();
        return requestApiParams.tenantId(tenantId);
    }

    public RequestApiParams tenantId(Long tenantId) {
        this.setTenantId(tenantId);
        return this;
    }

    public RequestApiParams request(String request) {
        this.setRequest(request);
        return this;
    }

    public RequestApiParams queryParams(QueryParams queryParams) {
        this.setQueryParams(queryParams);
        return this;
    }

    public Long getTenantId() {
        return tenantId;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    public QueryParams getQueryParams() {
        return queryParams;
    }

    public void setQueryParams(QueryParams queryParams) {
        this.queryParams = queryParams;
    }

    public String getRequest() {
        return request;
    }

    public void setRequest(String request) {
        this.request = request;
    }
}
